<!DOCTYPE html>
<html lang="zh-cn" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
<title th:text="|#{customer.systemTitle}-统计分析-登录日志|">图灵谷</title>
<div th:replace="fragments/head_admin">head</div>
<!--/***** 当前页css  start *****/-->
<link rel="stylesheet" type="text/css" th:href="@{/resources/vendor/tgCube/css/libs/dataTables.fixedHeader.css}" />
<link rel="stylesheet" type="text/css" th:href="@{/resources/vendor/tgCube/css/libs/dataTables.tableTools.css}" />
<link th:href="@{/resources/vendor/tgCube/css/libs/datepicker.css}" rel="stylesheet" />
<!--/***** 当前页css  end *****/-->
</head>
<body class="theme-turquoise fixed-header fixed-leftmenu fixed-footer">
	<div id="theme-wrapper">
		<div th:replace="fragments/nav_admin">导航栏</div>
		<div id="page-wrapper" class="container">
			<div th:replace="fragments/menu_admin::menu(root=monitor,current=logLoginList)">菜单栏</div>
			<div id="content-wrapper">
				<div th:replace="fragments/breadcrumbs_admin::breadcrumbs(parent=系统监控,current=登录日志)">面包屑栏</div>
				<div class="main-box clearfix">
					<header class="main-box-header clearfix">
						<div class="row m-b-sm m-t-sm">
							<div class="col-xs-4">
								<div class="input-daterange input-group" id="datepicker-range">
									<input id="startTime" name="startTime" th:value="${#dates.format(#dates.createToday(), 'yyyy-MM-dd')}" type="text" class="form-control" /> <span class="input-group-addon">到</span> <input id="endTime" name="endTime" th:value="${#dates.format(#dates.createToday(), 'yyyy-MM-dd')}" type="text"
										class="form-control" />
								</div>
							</div>
							<div class="col-xs-4 col-xs-offset-4">
								<div class="input-group">
									<input id="simpleQueryParam" name="simpleQueryParam" type="text" placeholder="请输入关键字搜索" class="form-control" /> <span class="input-group-btn">
										<button onclick="myTable.filter()" type="button" class="btn btn-primary">搜索</button>
									</span>
								</div>
							</div>
						</div>
					</header>
					<div class="main-box-body clearfix">
						<table id="dataTable" cellspacing="0" width="100%" class="table table-striped table-hover ">
							<thead>
								<tr>
									<th width="60px" class="text-center">序号</th>
									<th width="120px" class="text-center">操作类型</th>
									<th width="120px" class="text-center">用户</th>
									<th width="120px" class="text-center">ip</th>
									<th class="text-center">操作信息</th>
									<th width="150px" class="text-center">操作时间</th>
								</tr>
							</thead>
						</table>
					</div>
				</div>
				<div th:replace="fragments/footer_admin">底部</div>
			</div>
		</div>
	</div>
</body>
<div th:replace="fragments/import_js_admin">引入js</div>
<!--/***** 当前页js start *****/-->
<script th:src="@{/resources/vendor/tgCube/js/jquery.dataTables.js}"></script>
<script th:src="@{/resources/vendor/tgCube/js/dataTables.fixedHeader.js}"></script>
<script th:src="@{/resources/vendor/tgCube/js/dataTables.tableTools.js}"></script>
<script th:src="@{/resources/vendor/tgCube/js/jquery.dataTables.bootstrap.js}"></script>
<script th:src="@{/resources/vendor/bootstrap/plugins/bootstrap-datepicker.js}"></script>
<!--/***** 当前页js end *****/-->
<script th:inline="javascript">
    /*<![CDATA[*/
    //表格
    var myTable;
    //表格列定义
    var columnDefs = [ {
        //第一列，用来显示序号
        "searchable" : false,
        "orderable" : false,
        "targets" : 0
    } ];
    var columns = [ {
        //第一列，用来显示序号
        "data" : null,
        "class" : "text-center"
    }, {
        "data" : "logType",
        "class" : "text-center"
    }, {
        "data" : "username"
    }, {
        "data" : "ipAddress",
        "class" : "text-center"
    }, {
        "data" : "message"
    }, {
        "data" : "eventDate",
        "class" : "text-center"
    } ];
    //ajax参数
    var ajaxDataParamFun = function(d) {
        d.simpleQueryParam = $('#simpleQueryParam').val(); //模糊查询
        d.startTime = $('#startTime').val() ? $('#startTime').val() + ' 00:00:00' : ''; //开始时间
        d.endTime = $('#endTime').val() ? $('#endTime').val() + ' 23:59:59' : ''; //开始时间
    };
    //表格setting
    var setting = {
        listUrl : /*[[@{/admin/c/monitor/log/listLogin.gsp}]]*/'url',
        columnDefs : columnDefs, //表格列定义
        columns : columns, //表格列
        dataTableDiv : 'dataTable', //表格
        ajaxDataParamFun : ajaxDataParamFun, //ajax参数
        pageable : true, //是否分页
        showIndexColumn : true
    //是否显示第一列的索引列
    };
    //创建表格
    myTable = new TG_Tabel.createNew(setting);
    //加载完成后执行
    $(function() {
        //表格初始化
        myTable.init();
        //日期范围
        $('#datepicker-range').datepicker({
            format : 'yyyy-mm-dd',
            keyboardNavigation : false,
            forceParse : false,
            autoclose : true
        });
    });
    /*]]>*/
</script>
</html>